home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Documentation / Tech Notes & Articles / Recipes / Imaging & Layout / Frame Link Status < prev    next >
Encoding:
Text File  |  1995-11-06  |  2.1 KB  |  32 lines  |  [TEXT/ttxt]

  1. OpenDocâ„¢ Recipes
  2.  
  3. Frame Link Status
  4. By The OpenDoc Design Team
  5. November 6, 1995
  6.  
  7.  
  8. © 1993-1995  Apple Computer, Inc. All Rights Reserved.
  9. Apple, the Apple logo, AppleScript, Bento, Macintosh, QuickTime, and OpenDoc are 
  10. registered trademarks of Apple Computer, Inc.
  11. Finder, Mac, and QuickDraw are trademarks of Apple Computer, Inc. 
  12. SOM, SOMObjects, and System Object Model are licensed trademarks of IBM Corporation. 
  13.  
  14.  
  15. Introduction
  16.  
  17. Frames have a link status that indicates the frame's participation in links maintained by containing parts.  All OpenDoc parts that support embedding are responsible for ensuring that the link status of their embedded frames is set correctly.  This document summarizes the part responsibilities for a part that does not support linking.  Developers of parts supporting linking are referred to the Linking recipes for more information.
  18.  
  19. Implementing LinkStatusChanged
  20.  
  21. All parts that support embedding must implement ODPart::LinkStatusChanged.  All they must do is pass the notification along to all embedded frames by calling ODFrame::ChangeLinkStatus.  It is not necessary to internalize an embedded frame to make this call; it can be postponed until the embedded frame is internalized for some other reason.
  22.  
  23. Internalizing an Embedded Frame
  24.  
  25. It is the responsibility of every part to ensure that the link status of their embedded frames is set correctly.  The easiest way for a part editor that does not support linking to do this is to call the frame's ChangeLinkStatus method immediately after internalizing the embedded frame.  The ODLinkStatus parameter should be the link status of the part's display frame containing the embedded frame.  For example:
  26.  
  27. ODFrame* embeddedFrame = myDraft->AcquireFrame(ev, embeddedFrameID);
  28. embeddedFrame->ChangeLinkStatus(ev, myDisplayFrame->GetLinkStatus(ev));
  29.  
  30. Embedding a Frame
  31.  
  32. Parts must set the link status of frames they embed, be it by a paste, drop, or some other means.  If the part does not support linking, it should call the frame's ChangeLinkStatus method immediately after the frame is embedded and internalized.